package fr.vincent7894.feedroid.feed.task;

import java.util.Collection;

import android.os.AsyncTask;
import fr.vincent7894.feedroid.feed.mediator.FeedMediator;
import fr.vincent7894.feedroid.feed.mediator.impl.BasicFeedMediator;
import fr.vincent7894.feedroid.feed.pojo.Feed;
import fr.vincent7894.feedroid.feed.pojo.FeedAlias;

public abstract class AbstractFeedTask<V> extends AsyncTask<FeedAlias, Integer, Collection<Feed>> {
	
	private FeedMediator<V, AbstractFeedTask<V>> mediator;
	
	private String lastError;
	
	public AbstractFeedTask(V view) {
		super();
		
		this.mediator = new BasicFeedMediator<V, AbstractFeedTask<V>>(view, this);
	}
	
	public FeedMediator<V, AbstractFeedTask<V>> getMediator() {
		return mediator;
	}

	public String getLastError() {
		return lastError;
	}

	public void setLastError(String lastError) {
		this.lastError = lastError;
	}
}
